<script>
    jQuery(function($) {
        document.getElementById('a').onclick = function () {
            var arr = new Array(6);
            arr[0] = "a";
            arr[1] = "b";
            arr[2] = "c";
            arr[3] = "d";
            arr[4] = "e";
            arr[5] = "f";

            alert(arr.reverse())
        }
    });
</script>
<div class="bord">
    <div class="title">reverse</div>
    <div class="introduce">
        reverse() 方法用于颠倒数组中元素的顺序。
    </div>
</div>
<div class="bord">
    <div class="title">演示效果</div>
    <pre>
        在 a b c d e f  数组中,颠倒数组中元素的顺序。
    </pre>
    <button class="introduce" id="a">打印结果</button>
</div>
<div class="bord">
    <div class="title">代码</div>
    <div class="introduce">
        <pre>
                &lt;script&gt;
        jQuery(function($) {
            document.getElementById('a').onclick = function () {
                var arr = new Array(6);
                arr[0] = "a";
                arr[1] = "b";
                arr[2] = "c";
                arr[3] = "d";
                arr[4] = "e";
                arr[5] = "f";

                alert(arr.reverse())
            }
        });
                &lt;/script&gt;
        </pre>
    </div>
</div>